{extend name="public/base" /}

{block name="title"}<title>{$Think.lang.list}</title>{/block}

{block name="pjax_container"}
<section class="content-header">
    <h1>评论列表</h1>
    <ol class="breadcrumb">
        <li class="active"><i class="fa fa-dashboard"></i> 评论列表</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    {include file="public/top_action" /}
                    {include file="public/search" /}
                </div>
                <div class="box-body table-responsive">
                    <table class="table table-bordered table-hover table-sort">
                        <tr>
                            <th width="35"><input type="checkbox" class="minimal checkbox-toggle"></th>
                            <th>{$Think.lang.id}</th>
                            <th>{$Think.lang.nema}</th>
							<th>{$Think.lang.sort}</th>
							<th>{$Think.lang.create_time}</th>
                            <th>{$Think.lang.status}</th>
						
							
                        </tr>
                        {volist name="dataList" id="vo"}
                        <tr>
                            <td><input type="checkbox" name="id[]" value="{$vo.id}" class="minimal"></td>
                            <td>{$vo.id}</td>
                            <td>{$vo.nema}</td>
							<td>{$vo.sort}</td>
							<td>{$vo.create_time}</td>
							
							<td>
							    <a href="javascript:void(0);" data-id="{$vo.id}" data-field="status" 
							    data-value="{$vo.status}" data-url="{:url('edit', 'id='.$vo['id'])}" 
							    class='editimg fa {if condition=" $vo.status == 1 "}fa-check-circle text-green{else /}fa-times-circle text-red{/if}'></a>
							</td>
							    </td>
							    <td>{include file="public/list_action" /}</td>
							</tr>
							{/volist}
                          </div>
                    </table>
					
                </div>
                <div class="box-footer clearfix">
                </div>
            </div>
        </div>
    </div>
</section>
<script type="text/javascript">
    $(function(){
        /*ajax页面加载icheck，有该控件的页面才需要*/
        $('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
            checkboxClass: 'icheckbox_minimal-blue',
            radioClass: 'iradio_minimal-blue'
        });

        /*ajax页面加载icheck，有该控件的页面才需要*/
        $(".select2").select2({language:"zh-CN"});

        /*全选-反选*/
        $('.checkbox-toggle').on('ifChecked', function(event){
            var _this = $(this);
            var _table = _this.closest('.table');
            _table.find("tr td input[type='checkbox']").iCheck("check");
        });
        $('.checkbox-toggle').on('ifUnchecked', function(event){
            var _this = $(this);
            var _table = _this.closest('.table');
            _table.find("tr td input[type='checkbox']").iCheck("uncheck");
        });

        {if condition=" $rest_login == 1 "}
        restlogin('{$rest_login_info}');   //登录超时
        {/if}
        })
</script>
{/block}